package com.easylinkin.linkappapi.ruleengine.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easylinkin.linkappapi.intelligentrule.entity.IntelligentRuleExpression;
import com.easylinkin.linkappapi.linkage.entity.LinkageConfigRelateServiceParm;
import com.easylinkin.linkappapi.ruleengine.entity.DataFlush;
import com.easylinkin.linkappapi.ruleengine.entity.RuleExecution;
import com.easylinkin.linkappapi.ruleengine.entity.RuleTrigger;
import java.util.List;
import java.util.Set;
import org.apache.ibatis.annotations.Param;

/**
 * <p></p>
 *
 * @author TongJie
 * @since 2020/9/11 11:54
 */
public interface DataFlushServiceMapper extends BaseMapper<DataFlush> {


    List<RuleTrigger> getDeviceUnitIdErrorCanCorrectRuleTriggers(@Param("actualAddedTenantRefDeviceUnitIds") Set<String> actualAddedTenantRefDeviceUnitIds);

    List<RuleExecution> getDeviceUnitIdErrorCanCorrectRuleExecutions(@Param("actualAddedTenantRefDeviceUnitIds") Set<String> actualAddedTenantRefDeviceUnitIds);

    /**
     * 查询型号升级后引起型号错位 的数据
     *
     * @param actualAddedTenantRefDeviceUnitIds 查找限定范围
     */
    List<LinkageConfigRelateServiceParm> selectDeviceUnitIdErrorCanCorrectConfigRelateServiceParmList(@Param("actualAddedTenantRefDeviceUnitIds") Set<String> actualAddedTenantRefDeviceUnitIds);

    List<IntelligentRuleExpression> getDeviceAttrIdErrorCanCorrectRuleExpressions();

    List<IntelligentRuleExpression> getDeviceParentAttrIdErrorCanCorrectRuleExpressions();
}
